<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
</style>
<link rel="stylesheet" href="/css/app/common.css">
<link rel="stylesheet"  href="/css/app/member-packageList.css">	
<script src="/js/app/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>会员升级礼包列表</title>
<script type="text/javascript">

/*礼包商品详情页 */
function fn_GoPackageDetail(good_id,standard_id) {
	window.webkit.messageHandlers.ios_show_package_detail.postMessage(good_id+':::'+standard_id+':::${level}');
}
</script>
</head>
<body>
	<div class="main">
	<c:forEach items="${packageList}" var="c">
	<c:if test="${package_id==c.package_id}">
		<c:if test="${'ios'==os}">
			<div class="plate active"  onclick="fn_GoPackageDetail('${c.good_id}','${c.standard_id}')">
		</c:if>
		<c:if test="${'android'==os}">
			<div class="plate active" onclick="android.startPackageGoodsFromLevelUp('${c.package_id}','${c.good_id}','${c.standard_id}','${c.defaultPrice}')">
		</c:if>
	</c:if>
	<c:if test="${package_id!=c.package_id}">
		<c:if test="${'ios'==os}">
			<div class="plate"  onclick="fn_GoPackageDetail('${c.good_id}','${c.standard_id}')">
		</c:if>
		<c:if test="${'android'==os}">
			<div class="plate" onclick="android.startPackageGoodsFromLevelUp('${c.package_id}','${c.good_id}','${c.standard_id}','${c.defaultPrice}')">
		</c:if>
	</c:if>
			<h4>${c.package_name}</h4>
			<c:forEach items="${c.good_list}" var="g">
				<div class="flex-layout topInner">
					<div class="leftarea"><img src="${g.img}" alt=""  style="width:72px;height:72px;"></div>
					<div class="rightarea">
						<p>${g.name}</p>
						<c:if test="${package_id==c.package_id}">
							<c:if test="${standard_name!='' && default_price !=''}">
							<p>${standard_name}</p>
							<p>&yen;${default_price}</p>
							</c:if>
						</c:if>
						<c:if test="${package_id!=c.package_id}">
							<p>${g.standard_name}</p>
							<p>&yen;${g.default_price}</p>
						</c:if>
					</div>
				</div>
			</c:forEach>
			<div class="flex-layout botInner">
				<div class="leftarea"><img src="${ticket_logo }" alt=""  style="width:50px;"></div>
				<div class="rightarea">
					<p>${c.recharge_ticket}友米券</p>
					<p><fmt:formatNumber value="${rate*10}" pattern="#0.0" maxFractionDigits="1"/>折友米券</p>
					<p>&yen;<fmt:formatNumber value="${c.recharge_ticket*rate}" pattern="#0.00" maxFractionDigits="2"/></p>
				</div>
			</div>
		</div>
	</c:forEach>
	
	</div>
</body>
</html>